﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Xc.WaterMeters.ServerHosts.Migrations
{
    public partial class M1 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "RequestInfo_SendObject",
                table: "CommandInfos",
                newName: "RequestInfo_StringContent");

            migrationBuilder.RenameColumn(
                name: "RequestInfo_SendContent",
                table: "CommandInfos",
                newName: "RequestInfo_HexContent");

            migrationBuilder.AlterColumn<Guid>(
                name: "CommandId",
                table: "CommandInfos",
                type: "TEXT",
                nullable: false,
                oldClrType: typeof(ulong),
                oldType: "INTEGER");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "RequestInfo_StringContent",
                table: "CommandInfos",
                newName: "RequestInfo_SendObject");

            migrationBuilder.RenameColumn(
                name: "RequestInfo_HexContent",
                table: "CommandInfos",
                newName: "RequestInfo_SendContent");

            migrationBuilder.AlterColumn<ulong>(
                name: "CommandId",
                table: "CommandInfos",
                type: "INTEGER",
                nullable: false,
                oldClrType: typeof(Guid),
                oldType: "TEXT");
        }
    }
}
